package com.vhall.component.controller.rbac.adm;

import com.vhall.component.entity.rbac.vo.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * admin
 *
 * @author longzhen.gong
 * @date 2021/6/10 14:46
 */
@FeignClient(name = "RbacAdminActionFacade", path = "/v4/rbac/admin/action")
public interface RbacAdminActionFacade {

    /**
     * 操作列表
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("操作列表")
    @GetMapping(value = "/list")
    List<ActionsRspVO> list(@Validated ActionListReqVO reqVO);


    /**
     * 操作-添加
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("操作-添加")
    @PostMapping(value = "/add")
    ActionsVO add(@Validated ActionAddReqVO reqVO);

    /**
     * 操作-删除
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("操作-删除")
    @PostMapping(value = "/delete")
    Boolean delete(@Validated ActionDeleteReqVO reqVO);

    /**
     * 操作-编辑
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("操作-编辑")
    @PostMapping(value = "/edit")
    Boolean edit(@Validated ActionEditReqVO reqVO);

    /**
     * 操作-编辑
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("操作-编辑")
    @PostMapping(value = "/update")
    Boolean update(@Validated ActionEditReqVO reqVO);

    /**
     * 操作-增加操作子节点
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("操作-增加操作子节点")
    @PostMapping(value = "/add-actions")
    ActionsVO addActions(@Validated ActionAddChildReqVO reqVO);


    /**
     * 操作-更新状态
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("操作-更新状态")
    @PostMapping(value = "/change-status")
    Boolean changeStatus(@Validated ActionChangeStatusReqVO reqVO);
}
